import post2Portal from 'src/api/common'

export const getProductList = (data) => {
  let params = {
    api: '/sys/product/list',
    methods: 'GET',
    data: data
  }
  return post2Portal(params);
};

export const addProduct = (data) => {
  let params = {
    api: '/sys/product/add',
    methods: 'POST',
    data: data
  }
  return post2Portal(params);
};

export const getProduct = (data) => {
  let params = {
    api: '/sys/product/get',
    methods: 'POST',
    data: data
  }
  return post2Portal(params);
};

export const removeProduct = (data) => {
  let params = {
    api: '/sys/product/batch/remove',
    methods: 'POST',
    data: data
  }
  return post2Portal(params);
};

export const updateProduct = (data) => {
  let params = {
    api: '/sys/product/update',
    methods: 'POST',
    data: data
  }
  return post2Portal(params);
};
